var path = require('path');
const CopyPlugin = require('copy-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');

module.exports = {
  mode: 'development', // production, development
  entry: './src/index.js',
  output: {
    path: path.resolve(__dirname, 'dist'),
    filename: 'im-client-customer.js'
  },
  module: {
    rules: [
    ]
  },
  plugins: [
    new CleanWebpackPlugin(),
    new CopyPlugin([
      { from: 'src/layim', to: 'layim' },
      { from: 'src/shanqiu', to: 'shanqiu' },
      { from: 'node_modules/socket.io-client/dist/socket.io.js', to: 'socket.io.js' },
      { from: 'node_modules/jquery/dist/jquery.min.js', to: 'jquery.min.js' },
    ]),
  ],
};